﻿@using Abp.Collections.Extensions
@using Abp.Extensions
@model Abp.Web.Mvc.Models.ErrorViewModel
@{
    var errorMessage = Model.ErrorInfo.Message;
    var errorDetails = Model.ErrorInfo.Details;
    if (errorDetails.IsNullOrEmpty())
    {
        errorDetails = errorMessage;
        errorMessage = L("Error");
    }
}
<div class="row margin-bottom-40">
    <!-- BEGIN CONTENT -->
    <div class="col-md-12 col-sm-12">
        <div class="content-page page-500">
            <div class="number">
                500
            </div>
            <div class="details">
                <h3>
                    @errorMessage
                </h3>
                <p>
                    @errorDetails
                </p>
                @* Show validation errors *@
                @if (!Model.ErrorInfo.ValidationErrors.IsNullOrEmpty())
                {
                    <ul>
                        @foreach (var validationError in Model.ErrorInfo.ValidationErrors)
                        {
                            <li>
                                @validationError.Message
                                @if (validationError.Members != null && validationError.Members.Any())
                                {
                                    <text>(@string.Join(", ", validationError.Members))</text>
                                }
                            </li>
                        }
                    </ul>
                }
            </div>
        </div>
    </div>
    <!-- END CONTENT -->
</div>